/*
 * Created on 2008-06-06
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package elka.isi.comparator;

import elka.isi.individual.AnimalIndividual;
import elka.isi.individual.HerbivoreAnimalIndivdual;
import org.evolvica.core.IIndividual;
import org.evolvica.core.eval.AbstractIndividualComparator;
import org.evolvica.core.eval.DefaultFloatScoreComparator;
import org.evolvica.core.eval.FloatScore;

/**
 * @author jurek
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class HuntingComparator extends AbstractIndividualComparator {

	/* (non-Javadoc)
	 * @see org.evolvica.core.IIndividualComparator#compare(org.evolvica.core.IIndividual, org.evolvica.core.IIndividual)
	 */
	 
	 
	public int compare(IIndividual i0, IIndividual i1) {
		DefaultFloatScoreComparator comparator = new DefaultFloatScoreComparator();
        float score = (float) ((AnimalIndividual) i0).getHuntingScore();
        float score1 = (float) ((AnimalIndividual) i1).getHuntingScore();
        return comparator.compare(new FloatScore(score), new FloatScore(score1));
	}
	
}
